import React, { Component } from 'react';
import './Left.scss'
class Left extends Component {
    render() {
        return (
            <div className='mylist'>
                <div className='leftbox'>
                    {
                        this.props.arr.map((item,index)=>{
                            return (
                                <div className={`btn ${this.props.currentIndex == index ? 'active':''}`} key={index} onClick={ ()=>{
                                    this.props.handleClick(item,index)
                                }}>
                                {/* <span></span> */}
                                <p>{item.name}</p>
                                </div>
                            )
                        })
                    }
                </div>
            </div>
        );
    }
}

export default Left;